From: Stefano Stabellini Date: Tue, 5 Feb 2013 11:31:09 +0000 (+0000) Subject: xen/arm: implement vcpu_timer_destroy X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7316 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=f0cc428cbef61edff2f59aad2c077b5bc211c250;p=xen.git xen/arm: implement vcpu_timer_destroy Implement a function to destroy the per-vcpu phys and virt timers, call it from vcpu_destroy. Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell Acked-by: Tim Deegan Committed-by: Ian Campbell --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 0836c1692e..0aa261abde 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -399,6 +399,7 @@ int vcpu_initialise(struct vcpu *v) void vcpu_destroy(struct vcpu *v) { + vcpu_timer_destroy(v); free_xenheap_pages(v->arch.stack, STACK_ORDER); } diff --git a/xen/arch/arm/vtimer.c b/xen/arch/arm/vtimer.c index 361687918f..85201b5b05 100644 --- a/xen/arch/arm/vtimer.c +++ b/xen/arch/arm/vtimer.c @@ -65,6 +65,12 @@ int vcpu_vtimer_init(struct vcpu *v) return 0; } +void vcpu_timer_destroy(struct vcpu *v) +{ + kill_timer(&v->arch.virt_timer.timer); + kill_timer(&v->arch.phys_timer.timer); +} + int virt_timer_save(struct vcpu *v) { v->arch.virt_timer.ctl = READ_CP32(CNTV_CTL); diff --git a/xen/arch/arm/vtimer.h b/xen/arch/arm/vtimer.h index faebd6889d..43eef698d0 100644 --- a/xen/arch/arm/vtimer.h +++ b/xen/arch/arm/vtimer.h @@ -24,6 +24,7 @@ extern int vcpu_vtimer_init(struct vcpu *v); extern int vtimer_emulate(struct cpu_user_regs *regs, union hsr hsr); extern int virt_timer_save(struct vcpu *v); extern int virt_timer_restore(struct vcpu *v); +extern void vcpu_timer_destroy(struct vcpu *v); #endif